#!/bin/bash

# DO NOT EDIT THIS FILE
# any changes will be lost on board support package update

THIS_SCRIPT="updates"
MOTD_DISABLE=""

[[ -f /etc/default/armbian-motd ]] && . /etc/default/armbian-motd

for f in $MOTD_DISABLE; do
	[[ $f == $THIS_SCRIPT ]] && exit 0
done

NUM_UPDATES=0

[[ -f /var/cache/apt/archives/updates.number ]] && . /var/cache/apt/archives/updates.number

if [[ $NUM_UPDATES -gt 0 ]]; then
	echo -e "[\e[31m $NUM_SECURITY_UPDATES security updates available, $NUM_UPDATES updates total\e[0m: \e[1mapt upgrade\e[0m ]"
	echo -e "Last check: \e[92m$DATE\e[0m"
	echo
fi
